package com.bigben.firTry;

import com.bigben.entities.Apples;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by zhaoben on 2016/12/1.
 */
public class Fillter {

    /**
     * 获取所有红苹果
     */
    public List<Apples> redColFillter(List<Apples> apples){
        List<Apples> results = new ArrayList<Apples>();
        for (Apples apple : apples) {
            if("red".equals(apple.getColor())){
                results.add(apple);
            }
        }
        return results;
    }

    /**
     * 获取所有绿苹果
     */

    /**
     *获取所有重量超过150g苹果
     */
}
